const {Service}=require("egg")

const {createId}=require("../utils/utils")

class ViewIdentityService extends Service{

    async getViewIdentity(type_id){
        console.log(type_id);
    }

    async setViewIdentity(type_id,views_id){
        console.log(type_id,views_id);
        const id=createId(type_id)
        const sql=`insert into auth_identity_views (identity_id,type_id,views_id) values (?,?,?)`
        return await this.app.mysql.query(sql,[id,type_id,views_id])
    }
}

module.exports=ViewIdentityService